# Compiler and options
#CC = g++
#CFLAGS = -Wall -I/usr/i586-mingw32msvc/include -I/home/reborn/WorkSpace/C++_Related/crossCompWin32/xsd-3.3.0-i686-linux-gnu/libxsd -I/home/reborn/WorkSpace/C++_Related/crossCompWin32/xerces-c-3.1.1/install/include -I/home/reborn/WorkSpace/C++_Related/crossCompWin32/tclap-1.2.1/include
#LDFLAGS= -L/home/reborn/WorkSpace/C++_Related/crossCompWin32/xerces-c-3.1.1/install/lib -lxerces-c
LDFLAGS= -lxerces-c
# Output name
EXE = fortune
# List of source and object files
SRC = $(EXE).cpp quotation.cxx quotationHandler.cpp quotationXsdFile.cpp xsdFile.cpp fortuneFrontend.cpp
OBJ= $(EXE).o quotation.o quotationHandler.o quotationXsdFile.o xsdFile.o fortuneFrontend.o
# Default target
all : $(EXE).exe
# Build the executable with all the object files
$(EXE).exe : $(OBJ)
	$(CC) $(CFLAGS) $(OBJ) -o $@ $(LDFLAGS)
# Build the object file of each source file
# $< : first dependency
# $@ : current target
%.o : %.cpp
	$(CC) $(CFLAGS) -c $< -o $@
%.o : %.cxx
	$(CC) $(CFLAGS) -c $< -o $@

# Clean the project
clean :
	rm -f $(OBJ) $(EXE)

